package arraysList;

public class Test {
    public static void main(String[] args) {
        SeqList seqList = new SeqList();
        System.out.println("添加元素add：");
        seqList.add(12);
        seqList.add(8);
        seqList.add(2,5);
        System.out.println("打印顺序表：");
        seqList.display();
        System.out.println("判断是否包含元素：");
        System.out.println(seqList.contains(6));
        System.out.println("查找元素位置：");
        System.out.println(seqList.indexOf(12));
        System.out.println("查找下标位置元素：");
        System.out.println(seqList.get(2));
        System.out.println("替换/设置元素：");
        seqList.set(0,2);
        System.out.println("打印顺序表：");
        seqList.display();
        System.out.println("删除元素：");
        seqList.remove(5);
        System.out.println("打印顺序表：");
        seqList.display();
        System.out.println("判断是否为空（是否还有有效数）：");
        System.out.println(seqList.isEmpty());
        System.out.println("计算有效长度：");
        System.out.println(seqList.size());
        System.out.println("清空顺序表");
        seqList.clear();
        System.out.println("打印顺序表：");
        seqList.display();
    }
}
